#include <iostream>

#include "hbase.h"
using namespace std;


int main()
{
    cout << "hello world" << endl;
    char* str = "/home/ubuntu/workplace/code/mylibhv/libhv/build/lib/libhv.so";
    cout << hv_suffixname(str) << endl;

    //获取可执行文件绝对路径
    char exe_filepath[MAX_PATH] = {0};
    get_executable_path(exe_filepath, MAX_PATH);
    cout << "exe_filepath:" << exe_filepath << endl;

    //获取可执行文件所在目录
    char exe_filedir[MAX_PATH] = {0};
    get_executable_dir(exe_filedir, MAX_PATH);
    cout << "exe_filedir:" << exe_filedir << endl;

    //获取可执行文件名
    char exe_file[MAX_PATH] = {0};
    get_executable_file(exe_file, MAX_PATH);
    cout << "exe_file:" << exe_file << endl;
    cout << endl;

    //解析size字符串
    cout << "size:" << hv_parse_size("88M") << endl;

    //解析时间字符串
    cout << "time:" << hv_parse_time("1d3h30s") << endl;


    printf("STRINGIFY(time):%s\n", STRINGIFY(time));

    int var = 1;
    //printf("STRINGCAT(time hello):%s\n", STRINGCAT_HELPER("exe_filepath", "var"));
    int STRINGCAT_HELPER(exe_filepath, var) = 1;
    printf("STRINGCAT_HELPER(exe_filepath, var):%d\n", STRINGCAT_HELPER(exe_filepath, var));

    cout << hv_strupper("hellozb_jhc") << endl;

    return 0;
}

